import request from '@/utils/request'

//检查治疗项-附加费用项：获取
export function checkTreatment(params) {
  return request({
    url: `/admin/org/checkTreatment/all`,
    method: 'get',
    params:params
  })
}


//诊所注册信息
export function getRegisterInfo() {
  return request({
    url: '/admin/org/settings/hospital-info',
    method: 'get'
  })
}

//修改注册信息
export function enterHospital(data) {
  return request({
    url: `/admin/org/settings/hospital-submit`,
    method: 'post',
    data
  })
}

//修改注册信息
export function updateRegisterInfo(id,data) {
  return request({
    url: `/admin/org/settings/base-info/${id}`,
    method: 'put',
    data
  })
}
//人员管理列表
export function getPersonnelList(data) {
  return request({
    url: '/admin/org/user/list',
    method: 'post',
    data
  })
}
//删除人员
export function deletePersonnel(id) {
  return request({
    url: `/admin/org/user/remove/${id}`,
    method: 'delete',
  })
}
//科室列表
export function getDepartmentList(data) {
  return request({
    url: '/admin/org/departments/list',
    method: 'post',
    data
  })
}
//删除科室
export function deleteDepartment(id) {
  return request({
    url: `/admin/org/departments/remove/${id}`,
    method: 'delete',
  })
}
//检查与治疗项列表
export function getCheckList(data) {
  return request({
    url: '/admin/org/checkTreatment/list',
    method: 'post',
    data
  })
}
//获取角色列表
export function getRoles() {
  return request({
    url: '/admin/sys/role/list',
    method: 'get',
  })
}
//创建账号
export function createID(data) {
  return request({
    url: '/admin/org/user/create',
    method: 'post',
    data
  })
}
//编辑账号
export function editID(id,data) {
  return request({
    url: `/admin/org/user/update/${id}`,
    method: 'put',
    data
  })
}
//创建科室
export function createDepartment(data) {
  return request({
    url: '/admin/org/departments/create',
    method: 'post',
    data
  })
}
//编辑科室
export function editDepartment(id,data) {
  return request({
    url: `/admin/org/departments/update/${id}`,
    method: 'put',
    data
  })
}
//新建检查治疗项
export function createCheck(data) {
  return request({
    url: '/admin/org/checkTreatment/create',
    method: 'post',
    data
  })
}
//编辑检查治疗项
export function editCheck(id,data) {
  return request({
    url: `/admin/org/checkTreatment/update/${id}`,
    method: 'put',
    data
  })
}
//删除检查治疗项
export function deleteCheck(id) {
  return request({
    url: `/admin/org/checkTreatment/remove/${id}`,
    method: 'delete',
  })
}
//挂号费列表
export function registrationList() {
  return request({
    url: '/admin/reg/settings/list',
    method: 'get',

  })
}
//新建挂号项
export function createRegistrationList(data) {
  return request({
    url: '/admin/reg/settings/create',
    method: 'post',
    data
  })
}
//编辑挂号项
export function editRegistrationList(data) {
  return request({
    url: `/admin/reg/settings/edit`,
    method: 'post',
    data
  })
}
//删除挂号项
export function deleteRegistrationList(id) {
  return request({
    url: `/admin/reg/settings/remove/${id}`,
    method: 'delete',
  })
}
//系统信息
export function getSystemInfo(params) {
  return request({
    url: '/admin/sys/dic/item',
    method: 'get',
    params
  })
}
//保存设置
export function saveSystemInfo(id,data) {
  return request({
    url: `/admin/sys/dic/update/${id}`,
    method: 'put',
    data
  })
}
//验证手机是否存在
export function IsMobileExist(params) {
  return request({
    url: `/pub/existMobile`,
    method: 'get',
    params
  })
}
//验证登录名是否存在
export function IsNameExist(params) {
  return request({
    url: `/pub/existName`,
    method: 'get',
    params
  })
}
//验证邮箱是否存在
export function IsEmailExist(params) {
  return request({
    url: `/pub/existEmail`,
    method: 'get',
    params
  })
}
